﻿@{
    Style.Require("jQueryUI_Orchard");

    Script.Require("jQueryUI_Core");
    Script.Require("jQueryUI_Dialog");
}
<div id="deleteRatingConfirmationDialogDiv" title="Confirm Deletion" style="display:none">
    <p>@T("When you clear your rating, if you've left a review it will also be deleted. Do you wish to proceed?")</p>
        <input type="button" value="Yes" id="confirmDeleteRatingButton" />
        <input type="button" value="No" id="cancelDeleteRatingButton" />
</div>

@using (Script.Foot())
{
    <script type="text/javascript">
    //<![CDATA[
        var $deleteRatingConfirmationDialogDiv = $('#deleteRatingConfirmationDialogDiv');

        function OpenDeleteRatingConfirmationDialog() {
            $deleteRatingConfirmationDialogDiv.dialog('open');
            return false;
        }

        function CloseDeleteRatingConfirmationDialog() {
            $deleteRatingConfirmationDialogDiv.dialog('close');
            return false;
        }

        $(function () {
            $deleteRatingConfirmationDialogDiv.dialog({ autoOpen: false, modal: true, resizable: false });

            $('#cancelDeleteRatingButton').click(function () {
                CloseDeleteRatingConfirmationDialog();
                return false;
            });
        });
    //]]>
    </script>
}